package com.yuba.front.domain.bo;

import com.yuba.front.domain.CommentPosts;
import com.yuba.common.mybatis.core.domain.BaseEntity;
import com.yuba.common.core.validate.AddGroup;
import com.yuba.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 文章评论业务对象 comment_posts
 *
 * @author modakai
 * @date 2024-12-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CommentPosts.class, reverseConvertGenerate = false)
public class CommentPostsBo extends BaseEntity {

    /**
     * 对象存储主键
     */
    @NotNull(message = "对象存储主键不能为空", groups = { EditGroup.class })
    private Long commentId;

    /**
     * 帖子id
     */
    @NotNull(message = "帖子id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long postsId;

    /**
     * 评论用户id
     */
    @NotNull(message = "评论用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 父级评论id
     */
    @NotNull(message = "父级评论id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentId;

    /**
     * 评论目标用户id;
     */
//    @NotNull(message = "评论目标用户id;不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long replyUserId;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 是否置顶
     */
//    @NotBlank(message = "是否置顶不能为空", groups = { AddGroup.class, EditGroup.class })
    private String topFlag;

    /**
     * 点赞数
     */
//    @NotNull(message = "点赞数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long likeCount;

    /**
     * 备注
     */
//    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
